package com.nbsaas.boot.controller;

import com.nbsaas.boot.service.CodeExecutionService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/code")
@RequiredArgsConstructor
public class CodeExecutionController {
    private final CodeExecutionService codeExecutionService;

    @PostMapping("/execute")
    public String executeCode(@RequestBody String code) {
        return codeExecutionService.executeCode(code);
    }
} 